<div class="bottom">
	<div class="index" num="1">
			<img src="__PRIVATE__/Images/dw.png"/>
		<p>
			首頁
		</p>
	</div>
	<div class="my" num="0">
			<img src="__PRIVATE__/Images/我的.png"/>
		<p>
			個人中心
		</p>
	</div>
</div>

</body>
</html>
<script type="text/javascript">
$(document).ready(function(){
	$.cookie("index_num", '', { expires: -1 });
	$('.index').click(function(){
		if($(this).attr('num')==0){
			$.cookie("index_num",'', { expires: -1 });　
			$(this).attr('num','1');

			$('.my').attr('num','0');

			$.cookie('index_num', '1' , { expires: 7, path: '/' });
		}
		window.location.href = "{:U(MODULE_NAME.'/index/wash_shop_list')}"; //首页
	});
	$('.my').click(function(){
		if($(this).attr('num')==0){
			$.cookie("index_num",'', { expires: -1 });　
			$(this).attr('num','1');

			$('.index').attr('num','0');

			$.cookie('index_num', '0' ,  { expires: 7, path: '/' });
		}
		window.location.href = "{:U(MODULE_NAME.'/personal/my')}";   // 個人中心
	});

	if($.cookie('index_num')==1 || $.cookie('index_num')=='' || $.cookie('index_num')==null){
		$('.index').attr('num','1');
		$('.my').attr('num','0');
	}else if($.cookie('index_num')==0){
		$('.index').attr('num','0');
		$('.my').attr('num','1');
	}
	if($('.index').attr('num')==1){
		$('.index').children('p').css('color','#ff8800');
		$('.index').children('img').attr('src','__PRIVATE__/Images/dw.png');
		$('.index').attr('num','1');

		$('.my').children('p').css('color','#000');
		$('.my').children('img').attr('src','__PRIVATE__/Images/我的.png');
		$('.my').attr('num','0');
	}else if($('.index').attr('num')==0){
		$('.my').children('p').css('color','#ff8800');
		$('.my').children('img').attr('src','__PRIVATE__/Images/我的1.png');
		$('.my').attr('num','1');

		$('.index').children('p').css('color','#000');
		$('.index').children('img').attr('src','__PRIVATE__/Images/dwc.png');
		$('.index').attr('num','0');
	}

});

</script>
